import request from "@/utils/request"

// 上传增加
export function uploadAdd(data) {
  return request({
    url: "/v1/cmdb/data/add?cmdb!modelNo=met_lp_inspect_proof",
    method: "post",
    data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  })
}


// 查看防雷检查单位上传的佐证材料
export function findInspectProofs(params) {
  return request({
    url: `/v1/plugins/met/lpInspectPlanUnit/findInspectProofs`,
    method: "get",
    params
  })
}


// 获取佐证材料
export function findByIdProofs(proof_id) {
  return request({
    url: `/v1/cmdb/data/findById?cmdb!modelNo=met_lp_inspect_proof&proof_id=${proof_id}`,
    method: "get",
  })
}

// 编辑佐证材料
export function updateProofs(data) {
  return request({
    url: "/v1/cmdb/data/update?cmdb!modelNo=met_lp_inspect_proof",
    method: "post",
    data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  })
}

// 删除佐证材料
export function deleteListProofs(data) {
  return request({
    url: `/v1/cmdb/data/deleteList?cmdb!modelNo=met_lp_inspect_proof`,
    method: "post",
    data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  })
}